All Questions
Tagged with design-patternsbeginner
45 questions
3votes
0answers
53views
Structure of nested Divs with a table
I'm a new frontend programmer. I'm making a web site with flask, and to be honest, I don't know much about front-end so I don't know if what I'm doing is best practices. In one section, I have a div ...
1vote
1answer
126views
Bird struct and other type of birds
I am learning Go and trying to write a Bird design in Go. Here is the code. How can I improve it? bird/bird.go ...
4votes
1answer
2kviews
Java 2 Player Object Oriented CLI Chess Game
I just finished implementing a Java 2 player CLI chess game, it involves player putting in commands (i.e "move e2 e4" to move or "attack d1 d5" to capture.). I am trying to follow ...
1vote
2answers
110views
Java dependency injection and hiding details of methods in "Database"-class
I recently posted a bunch of code of my to-do list application and after getting some very helpful and good suggestions on how to improve, I took a shot at it! Here's a link to the former post I made -...
5votes
1answer
76views
Othello game in Tk
I've recently reached a milestone for my Othello clone. This is my first Python project and the farthest I've come to a full program beyond small scripts and little automations. I'd love for you to ...
4votes
2answers
1kviews
Object Oriented Library Management System
Library management system is a object oriented program that takes care of the basic housekeeping of a library. This is the third part of a series. The first iteration of the project is found here and ...
2votes
0answers
806views
Structuring Service and DAO Layers in Go
I am having a bit of difficulty in designing my Go code. I'll try to demonstrate things with a very simple example of adding a new user to the database. My Handler is only doing one thing: Calling a ...
5votes
2answers
2kviews
Pin and Password Generator JAVA
I am reaching my one year on programming and decided to create a simple pin and password program to better help me understand arrays. As far as coding standards, best practices, and functionality what ...
3votes
1answer
141views
Small Javascript Lib to draw SVG file
I'm new to JavaScript and I decided to make a script that allows other developers to show SVG elements in the web browser. (It is just for learning purposes), and it is still under development. I ...
6votes
2answers
784views
Implementing web scraping in a function and in a class
The goal of my code is to implement a web scraping routine to obtain the name and the price of a product. I want to put this routine separated from the main program file. Sample url to scrape: https://...
1vote
2answers
1kviews
Generic Implementation for Paging Class in c#
I have created one generic Page class for store paging information with its data. The class look like: ...
2votes
1answer
166views
Find closest elements in an array relative to given index with a bias to distance from index and direction
This function determines which images should be loaded based on which image is currently in the viewport (array index), what direction the user is scrolling, and if the image has yet to be loaded. It ...
0votes
1answer
90views
Invocable callout(Post) from processbuilder
I am relatively new in making (invocable)callouts. My main concern is if I should be using smaller parts for example for the body and using a query only once in this case. Any suggestions would be ...
4votes
3answers
3kviews
Finite State Machine in C++
I made a state machine. You can press 0 and 1 to switch between the hypothetical menu and playing state. I hope you can help me improve it further. StateManager.h ...
1vote
1answer
320views
Lazy prime counting function [closed]
I have written a simple snippet of code that implements a function that returns a list of primes up to a certain integer n. Assuming that this function could be ...